3.128 \(\int \frac{(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx\)

Optimal. Leaf size=248 \[ -\frac{3 \sec ^5(e+f x) \cos ^2(e+f x)^{\frac{p+7}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac{p+2}{2},\frac{p+7}{2};\frac{p+4}{2};\sin ^2(e+f x)\right )}{a^3 f g^2 (p+2)}-\frac{\sec ^3(e+f x) \cos ^2(e+f x)^{\frac{p+7}{2}} (g \tan (e+f x))^{p+4} \, _2F_1\left (\frac{p+4}{2},\frac{p+7}{2};\frac{p+6}{2};\sin ^2(e+f x)\right )}{a^3 f g^4 (p+4)}+\frac{5 (g \tan (e+f x))^{p+3}}{a^3 f g^3 (p+3)}+\frac{4 (g \tan (e+f x))^{p+5}}{a^3 f g^5 (p+5)}+\frac{(g \tan (e+f x))^{p+1}}{a^3 f g (p+1)} \]

[Out]

(g*Tan[e + f*x])^(1 + p)/(a^3*f*g*(1 + p)) - (3*(Cos[e + f*x]^2)^((7 + p)/2)*Hypergeometric2F1[(2 + p)/2, (7 +
 p)/2, (4 + p)/2, Sin[e + f*x]^2]*Sec[e + f*x]^5*(g*Tan[e + f*x])^(2 + p))/(a^3*f*g^2*(2 + p)) + (5*(g*Tan[e +
 f*x])^(3 + p))/(a^3*f*g^3*(3 + p)) - ((Cos[e + f*x]^2)^((7 + p)/2)*Hypergeometric2F1[(4 + p)/2, (7 + p)/2, (6
 + p)/2, Sin[e + f*x]^2]*Sec[e + f*x]^3*(g*Tan[e + f*x])^(4 + p))/(a^3*f*g^4*(4 + p)) + (4*(g*Tan[e + f*x])^(5
 + p))/(a^3*f*g^5*(5 + p))

________________________________________________________________________________________

Rubi [A]  time = 0.421813, antiderivative size = 248, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {2711, 2607, 270, 16, 2617, 14} \[ -\frac{3 \sec ^5(e+f x) \cos ^2(e+f x)^{\frac{p+7}{2}} (g \tan (e+f x))^{p+2} \, _2F_1\left (\frac{p+2}{2},\frac{p+7}{2};\frac{p+4}{2};\sin ^2(e+f x)\right )}{a^3 f g^2 (p+2)}-\frac{\sec ^3(e+f x) \cos ^2(e+f x)^{\frac{p+7}{2}} (g \tan (e+f x))^{p+4} \, _2F_1\left (\frac{p+4}{2},\frac{p+7}{2};\frac{p+6}{2};\sin ^2(e+f x)\right )}{a^3 f g^4 (p+4)}+\frac{5 (g \tan (e+f x))^{p+3}}{a^3 f g^3 (p+3)}+\frac{4 (g \tan (e+f x))^{p+5}}{a^3 f g^5 (p+5)}+\frac{(g \tan (e+f x))^{p+1}}{a^3 f g (p+1)} \]

Antiderivative was successfully verified.

[In]

Int[(g*Tan[e + f*x])^p/(a + a*Sin[e + f*x])^3,x]

[Out]

(g*Tan[e + f*x])^(1 + p)/(a^3*f*g*(1 + p)) - (3*(Cos[e + f*x]^2)^((7 + p)/2)*Hypergeometric2F1[(2 + p)/2, (7 +
 p)/2, (4 + p)/2, Sin[e + f*x]^2]*Sec[e + f*x]^5*(g*Tan[e + f*x])^(2 + p))/(a^3*f*g^2*(2 + p)) + (5*(g*Tan[e +
 f*x])^(3 + p))/(a^3*f*g^3*(3 + p)) - ((Cos[e + f*x]^2)^((7 + p)/2)*Hypergeometric2F1[(4 + p)/2, (7 + p)/2, (6
 + p)/2, Sin[e + f*x]^2]*Sec[e + f*x]^3*(g*Tan[e + f*x])^(4 + p))/(a^3*f*g^4*(4 + p)) + (4*(g*Tan[e + f*x])^(5
 + p))/(a^3*f*g^5*(5 + p))

Rule 2711

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.), x_Symbol] :> Dist[a^(2*
m), Int[ExpandIntegrand[(g*Tan[e + f*x])^p/Sec[e + f*x]^m, (a*Sec[e + f*x] - b*Tan[e + f*x])^(-m), x], x], x]
/; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 16

Int[(u_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Dist[1/b^m, Int[u*(b*v)^(m + n), x], x] /; FreeQ[{b, n}, x
] && IntegerQ[m]

Rule 2617

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((a*Sec[e +
f*x])^m*(b*Tan[e + f*x])^(n + 1)*(Cos[e + f*x]^2)^((m + n + 1)/2)*Hypergeometric2F1[(n + 1)/2, (m + n + 1)/2,
(n + 3)/2, Sin[e + f*x]^2])/(b*f*(n + 1)), x] /; FreeQ[{a, b, e, f, m, n}, x] &&  !IntegerQ[(n - 1)/2] &&  !In
tegerQ[m/2]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{(g \tan (e+f x))^p}{(a+a \sin (e+f x))^3} \, dx &=\frac{\int \left (a^3 \sec ^6(e+f x) (g \tan (e+f x))^p-3 a^3 \sec ^5(e+f x) \tan (e+f x) (g \tan (e+f x))^p+3 a^3 \sec ^4(e+f x) \tan ^2(e+f x) (g \tan (e+f x))^p-a^3 \sec ^3(e+f x) \tan ^3(e+f x) (g \tan (e+f x))^p\right ) \, dx}{a^6}\\ &=\frac{\int \sec ^6(e+f x) (g \tan (e+f x))^p \, dx}{a^3}-\frac{\int \sec ^3(e+f x) \tan ^3(e+f x) (g \tan (e+f x))^p \, dx}{a^3}-\frac{3 \int \sec ^5(e+f x) \tan (e+f x) (g \tan (e+f x))^p \, dx}{a^3}+\frac{3 \int \sec ^4(e+f x) \tan ^2(e+f x) (g \tan (e+f x))^p \, dx}{a^3}\\ &=\frac{\operatorname{Subst}\left (\int (g x)^p \left (1+x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{a^3 f}-\frac{\int \sec ^3(e+f x) (g \tan (e+f x))^{3+p} \, dx}{a^3 g^3}+\frac{3 \int \sec ^4(e+f x) (g \tan (e+f x))^{2+p} \, dx}{a^3 g^2}-\frac{3 \int \sec ^5(e+f x) (g \tan (e+f x))^{1+p} \, dx}{a^3 g}\\ &=-\frac{3 \cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{2+p}{2},\frac{7+p}{2};\frac{4+p}{2};\sin ^2(e+f x)\right ) \sec ^5(e+f x) (g \tan (e+f x))^{2+p}}{a^3 f g^2 (2+p)}-\frac{\cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{4+p}{2},\frac{7+p}{2};\frac{6+p}{2};\sin ^2(e+f x)\right ) \sec ^3(e+f x) (g \tan (e+f x))^{4+p}}{a^3 f g^4 (4+p)}+\frac{\operatorname{Subst}\left (\int \left ((g x)^p+\frac{2 (g x)^{2+p}}{g^2}+\frac{(g x)^{4+p}}{g^4}\right ) \, dx,x,\tan (e+f x)\right )}{a^3 f}+\frac{3 \operatorname{Subst}\left (\int (g x)^{2+p} \left (1+x^2\right ) \, dx,x,\tan (e+f x)\right )}{a^3 f g^2}\\ &=\frac{(g \tan (e+f x))^{1+p}}{a^3 f g (1+p)}-\frac{3 \cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{2+p}{2},\frac{7+p}{2};\frac{4+p}{2};\sin ^2(e+f x)\right ) \sec ^5(e+f x) (g \tan (e+f x))^{2+p}}{a^3 f g^2 (2+p)}+\frac{2 (g \tan (e+f x))^{3+p}}{a^3 f g^3 (3+p)}-\frac{\cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{4+p}{2},\frac{7+p}{2};\frac{6+p}{2};\sin ^2(e+f x)\right ) \sec ^3(e+f x) (g \tan (e+f x))^{4+p}}{a^3 f g^4 (4+p)}+\frac{(g \tan (e+f x))^{5+p}}{a^3 f g^5 (5+p)}+\frac{3 \operatorname{Subst}\left (\int \left ((g x)^{2+p}+\frac{(g x)^{4+p}}{g^2}\right ) \, dx,x,\tan (e+f x)\right )}{a^3 f g^2}\\ &=\frac{(g \tan (e+f x))^{1+p}}{a^3 f g (1+p)}-\frac{3 \cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{2+p}{2},\frac{7+p}{2};\frac{4+p}{2};\sin ^2(e+f x)\right ) \sec ^5(e+f x) (g \tan (e+f x))^{2+p}}{a^3 f g^2 (2+p)}+\frac{5 (g \tan (e+f x))^{3+p}}{a^3 f g^3 (3+p)}-\frac{\cos ^2(e+f x)^{\frac{7+p}{2}} \, _2F_1\left (\frac{4+p}{2},\frac{7+p}{2};\frac{6+p}{2};\sin ^2(e+f x)\right ) \sec ^3(e+f x) (g \tan (e+f x))^{4+p}}{a^3 f g^4 (4+p)}+\frac{4 (g \tan (e+f x))^{5+p}}{a^3 f g^5 (5+p)}\\ \end{align*}

Mathematica [B]  time = 31.2325, size = 1276, normalized size = 5.15 \[ \text{result too large to display} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(g*Tan[e + f*x])^p/(a + a*Sin[e + f*x])^3,x]

[Out]

(2^(1 + p)*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^6*Tan[(e + f*x)/2]*(1 - Tan[(e + f*x)/2]^2)^p*(-(Tan[(e + f*x
)/2]/(-1 + Tan[(e + f*x)/2]^2)))^p*(Hypergeometric2F1[(1 + p)/2, 2 + p, (3 + p)/2, Tan[(e + f*x)/2]^2]/(1 + p)
 - (4*Hypergeometric2F1[(1 + p)/2, 3 + p, (3 + p)/2, Tan[(e + f*x)/2]^2])/(1 + p) + (8*Hypergeometric2F1[(1 +
p)/2, 4 + p, (3 + p)/2, Tan[(e + f*x)/2]^2])/(1 + p) - (8*Hypergeometric2F1[(1 + p)/2, 5 + p, (3 + p)/2, Tan[(
e + f*x)/2]^2])/(1 + p) + (4*Hypergeometric2F1[(1 + p)/2, 6 + p, (3 + p)/2, Tan[(e + f*x)/2]^2])/(1 + p) - (2*
Hypergeometric2F1[(2 + p)/2, 2 + p, (4 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2])/(2 + p) + (12*Hypergeomet
ric2F1[(2 + p)/2, 3 + p, (4 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2])/(2 + p) - (32*Hypergeometric2F1[(2 +
 p)/2, 4 + p, (4 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2])/(2 + p) + (40*Hypergeometric2F1[(2 + p)/2, 5 +
p, (4 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2])/(2 + p) - (24*Hypergeometric2F1[(2 + p)/2, 6 + p, (4 + p)/
2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2])/(2 + p) + (Hypergeometric2F1[2 + p, (3 + p)/2, (5 + p)/2, Tan[(e + f*
x)/2]^2]*Tan[(e + f*x)/2]^2)/(3 + p) - (12*Hypergeometric2F1[(3 + p)/2, 3 + p, (5 + p)/2, Tan[(e + f*x)/2]^2]*
Tan[(e + f*x)/2]^2)/(3 + p) + (48*Hypergeometric2F1[(3 + p)/2, 4 + p, (5 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e +
f*x)/2]^2)/(3 + p) - (80*Hypergeometric2F1[(3 + p)/2, 5 + p, (5 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^2
)/(3 + p) + (60*Hypergeometric2F1[(3 + p)/2, 6 + p, (5 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^2)/(3 + p)
 + (4*Hypergeometric2F1[3 + p, (4 + p)/2, (6 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^3)/(4 + p) - (32*Hyp
ergeometric2F1[(4 + p)/2, 4 + p, (6 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^3)/(4 + p) + (80*Hypergeometr
ic2F1[(4 + p)/2, 5 + p, (6 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^3)/(4 + p) - (80*Hypergeometric2F1[(4
+ p)/2, 6 + p, (6 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^3)/(4 + p) + (8*Hypergeometric2F1[4 + p, (5 + p
)/2, (7 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^4)/(5 + p) - (40*Hypergeometric2F1[(5 + p)/2, 5 + p, (7 +
 p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^4)/(5 + p) + (60*Hypergeometric2F1[(5 + p)/2, 6 + p, (7 + p)/2, Ta
n[(e + f*x)/2]^2]*Tan[(e + f*x)/2]^4)/(5 + p) + (8*Hypergeometric2F1[3 + p/2, 5 + p, 4 + p/2, Tan[(e + f*x)/2]
^2]*Tan[(e + f*x)/2]^5)/(6 + p) - (24*Hypergeometric2F1[(6 + p)/2, 6 + p, (8 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(
e + f*x)/2]^5)/(6 + p) + (4*Hypergeometric2F1[6 + p, (7 + p)/2, (9 + p)/2, Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2
]^6)/(7 + p))*(g*Tan[e + f*x])^p)/(f*(a + a*Sin[e + f*x])^3*Tan[e + f*x]^p)

________________________________________________________________________________________

Maple [F]  time = 0.451, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( g\tan \left ( fx+e \right ) \right ) ^{p}}{ \left ( a+a\sin \left ( fx+e \right ) \right ) ^{3}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*tan(f*x+e))^p/(a+a*sin(f*x+e))^3,x)

[Out]

int((g*tan(f*x+e))^p/(a+a*sin(f*x+e))^3,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{3}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*tan(f*x+e))^p/(a+a*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

integrate((g*tan(f*x + e))^p/(a*sin(f*x + e) + a)^3, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{\left (g \tan \left (f x + e\right )\right )^{p}}{3 \, a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3} +{\left (a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3}\right )} \sin \left (f x + e\right )}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*tan(f*x+e))^p/(a+a*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

integral(-(g*tan(f*x + e))^p/(3*a^3*cos(f*x + e)^2 - 4*a^3 + (a^3*cos(f*x + e)^2 - 4*a^3)*sin(f*x + e)), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*tan(f*x+e))**p/(a+a*sin(f*x+e))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (g \tan \left (f x + e\right )\right )^{p}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{3}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*tan(f*x+e))^p/(a+a*sin(f*x+e))^3,x, algorithm="giac")

[Out]

integrate((g*tan(f*x + e))^p/(a*sin(f*x + e) + a)^3, x)